<template>
  <div>
    <p class="head">商品列表</p>
    <ul>
      <li v-for="(item, index) in goodsList" :key="index">
        <router-link :to="'/detail/'+item.name+'?name=pony'">{{ item.name }}</router-link>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      goodsList: [
        { name: "iphone", id: "001" },
        { name: "huawei", id: "002" },
        { name: "mini", id: "003" },
      ],
    };
  },
};
</script>

<style>
.head{
    position:relative;
    width:100%;
    height:88px;
    line-height:88px;
}
</style>